﻿namespace GoodAdmin.System;

public class RolePageInput : BasePageInput
{
    public string RoleName { get; set; }
}
public class RoleAddInput : SysRole
{
    [Required(ErrorMessage ="角色名称不能为空")]
    public override string RoleName { get; set; }
    [Required(ErrorMessage = "角色编码不能为空")]
    public override string Code { get; set; }

}

public class RoleUpdateInput : RoleAddInput
{
    [Required(ErrorMessage = "Id不能为空")]
    public override long Id { get; set; }
}
/// <summary>
/// 为角色分配菜单
/// </summary>
public class RoleMenusInput:BaseIdInput
{
    public List<long> MenuList { get; set; }
}
/// <summary>
/// 为角色授权用户
/// </summary>
public class RoleUsersInput : BaseIdInput
{
    public List<long> UserList { get; set; }
}

/// <summary>
/// 为角色授权组织
/// </summary>
public class RoleOrgsInput : BaseIdInput
{
    public List<long> OrgList { get; set; }
}

/// <summary>
/// 为角色授权职位
/// </summary>
public class RolePositionsInput : BaseIdInput
{
    public List<long> PositionList { get; set; }
}
/// <summary>
/// 为角色分配菜单
/// </summary>
public class RoleResourceInput : RoleResourceInfo
{
    [Required(ErrorMessage ="角色Id不能为空")]
    public override long Id { get; set; }

    [Required(ErrorMessage = "至少包含一项资源信息")]
    public override List<ResourceInfo> Resources { get; set; }
}